package ca.eloas.judging.objectify;

import ca.eloas.judging.model.CompetitionObject;
import ca.eloas.judging.model.JudgeObject;
import ca.eloas.judging.model.ScoreObject;
import ca.eloas.judging.model.TeamObject;
import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyFactory;
import com.googlecode.objectify.ObjectifyService;

/**
 * @author JP
 */
public class ObjecticyServiceImpl implements PersistenceService<Objectify> {

    private ObjectifyFactory factory = null;

    {
        factory = ObjectifyService.factory();
        factory.register(TeamObject.class);
        factory.register(CompetitionObject.class);
        factory.register(JudgeObject.class);
        factory.register(ScoreObject.class);
    }

    public Objectify manager() {
        return ObjectifyService.ofy();
    }
}
